package com.linkage.lcims.base.po.business;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;


/** 
 *        @hibernate.class
 *         table="BD_TOLL_POLICY_SUIT"
 *     
*/
@SuppressWarnings("serial")
public class BdTollPolicySuit implements Serializable {

    /** identifier field */
    private com.linkage.lcims.base.po.business.BdTollPolicySuitPK comp_id;

    /** persistent field */
    private Integer endaddspan;

    /** persistent field */
    private Integer addspanunit;

    /** persistent field */
    private String endtimespan;

    /** persistent field */
    private Integer rate;

    /** persistent field */
    private Integer rateunit;

    /** nullable persistent field */
    private String description;

    /** full constructor */
    public BdTollPolicySuit(com.linkage.lcims.base.po.business.BdTollPolicySuitPK comp_id, Integer endaddspan, Integer addspanunit, String endtimespan, Integer rate, Integer rateunit, String description) {
        this.comp_id = comp_id;
        this.endaddspan = endaddspan;
        this.addspanunit = addspanunit;
        this.endtimespan = endtimespan;
        this.rate = rate;
        this.rateunit = rateunit;
        this.description = description;
    }

    /** default constructor */
    public BdTollPolicySuit() {
    }

    /** minimal constructor */
    public BdTollPolicySuit(com.linkage.lcims.base.po.business.BdTollPolicySuitPK comp_id, Integer endaddspan, Integer addspanunit, String endtimespan, Integer rate, Integer rateunit) {
        this.comp_id = comp_id;
        this.endaddspan = endaddspan;
        this.addspanunit = addspanunit;
        this.endtimespan = endtimespan;
        this.rate = rate;
        this.rateunit = rateunit;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *         
     */
    public com.linkage.lcims.base.po.business.BdTollPolicySuitPK getComp_id() {
        return this.comp_id;
    }

    public void setComp_id(com.linkage.lcims.base.po.business.BdTollPolicySuitPK comp_id) {
        this.comp_id = comp_id;
    }

    /** 
     *            @hibernate.property
     *             column="endaddspan"
     *             length="10"
     *             not-null="true"
     *         
     */
    public Integer getEndaddspan() {
        return this.endaddspan;
    }

    public void setEndaddspan(Integer endaddspan) {
        this.endaddspan = endaddspan;
    }

    /** 
     *            @hibernate.property
     *             column="addspanunit"
     *             length="10"
     *             not-null="true"
     *         
     */
    public Integer getAddspanunit() {
        return this.addspanunit;
    }

    public void setAddspanunit(Integer addspanunit) {
        this.addspanunit = addspanunit;
    }

    /** 
     *            @hibernate.property
     *             column="endtimespan"
     *             length="6"
     *             not-null="true"
     *         
     */
    public String getEndtimespan() {
        return this.endtimespan;
    }

    public void setEndtimespan(String endtimespan) {
        this.endtimespan = endtimespan;
    }

    /** 
     *            @hibernate.property
     *             column="rate"
     *             length="10"
     *             not-null="true"
     *         
     */
    public Integer getRate() {
        return this.rate;
    }

    public void setRate(Integer rate) {
        this.rate = rate;
    }

    /** 
     *            @hibernate.property
     *             column="rateunit"
     *             length="10"
     *             not-null="true"
     *         
     */
    public Integer getRateunit() {
        return this.rateunit;
    }

    public void setRateunit(Integer rateunit) {
        this.rateunit = rateunit;
    }

    /** 
     *            @hibernate.property
     *             column="description"
     *             length="100"
     *         
     */
    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("comp_id", getComp_id())
            .toString();
    }

    public boolean equals(Object other) {
        if ( (this == other ) ) return true;
        if ( !(other instanceof BdTollPolicySuit) ) return false;
        BdTollPolicySuit castOther = (BdTollPolicySuit) other;
        return new EqualsBuilder()
            .append(this.getComp_id(), castOther.getComp_id())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getComp_id())
            .toHashCode();
    }

}
